package com.itheima.ydd.dto;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

/**
 * @author zihao
 * @version 1.0
 * @date 2022/4/11 0011 zihao
 */
public class PageDto<T> extends Page<T> {


    public List<T> getdata() {
        return super.getRecords();
    }

    public List<T> getRecords() {
        return null;
    }

    //一共多少条
    public long getCount() {
        return super.total;
    }

    //一共多少页
    public long getTotalPages() {
        return super.getPages();
    }

    //每页数量
    public long getPageSize() {
        return super.size;
    }

    //  当前页码
    public long getCurrentPage() {
        return super.current;
    }

    public PageDto() {
    }

    //构造
    public PageDto(long current, long size) {
        super(current, size);
    }

    public PageDto(long current, long size, long total) {
        super(current, size, total);
    }

    public PageDto(long current, long size, boolean isSearchCount) {
        super(current, size, isSearchCount);
    }

    public PageDto(long current, long size, long total, boolean isSearchCount) {
        super(current, size, total, isSearchCount);
    }

}
